import java.util.Arrays;

public class Test {

    public static void main(String[] args) {
        int rabbit = (90 - 2 * 35) / 2;
        int chickens = 35 -rabbit;
        System.out.println( "兔子有： "+ rabbit + " 只。" + "鸡有 "+ chickens + " 只");
        System.out.println(10%3.0);
        // 测试提交
        rev();

    }

    // 1. 求和
    public static void sum(){
        int sum =0;
        int count = 0;
        for (int i = 1; i <= 200; i++) {
            if (i % 2 == 0) {
                sum = sum + i;
                count++;
            }

        }

        System.out.println(sum);
    }


    // 最大值
    public static void max() {
        int[] arr = {40, 50, 10, 130};

        int max = arr[0]; // 默认第一个数是最大值
        for (int i = 0; i < arr.length; i++) {
            if (max < arr[i]) {
                max = arr[i]; // 更换位置
            }
        }
        System.out.println(max);

    }

    // 数组翻转
    public static void rev() {
        int[] arr = {1, 2, 3, 4, 5};
        int[] arr2 = new int[arr.length];


        for (int i = arr.length - 1, j = 0; i >= 0; i--, j++) {
            arr2[j] = arr[i];
        }
        System.out.println(Arrays.toString(arr2));;

        int A =10,B=20,C=30;
        int max= 0;
        max = A > B ? A > C ? A : C : B > C ? B : C;
        System.out.println(max);

    }



}
